package com.authine.cloudpivot.engine.api.facade.dubbo;

import com.alibaba.dubbo.config.annotation.Service;
import com.authine.cloudpivot.engine.api.facade.TaskReportFacade;
import com.authine.cloudpivot.engine.plugin.service.TaskReportService;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.beans.factory.annotation.Autowired;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import java.math.BigDecimal;
import java.util.*;

/**
 * @description:
 * @author: zyj
 * @time: 2021/6/17 17:45
 */
@Service(version = "1.00")
public class TaskReportFacadeImpl implements TaskReportFacade {

    @Autowired
    private TaskReportService taskReportService;

    @Override
    public Boolean getXiaFaDataLejuan() {
        return taskReportService.getXiaFaDataLejuan();
    }

    @Override
    public String getProjects() {
        return taskReportService.getProjects();
    }

    @Override
    public Boolean moveSubject(String oldUserId, String newUserId, String subjectId) {
        return taskReportService.moveSubject(oldUserId,newUserId,subjectId);
    }

    @Override
    public Boolean createZiJianQCReport() {
        return taskReportService.createZiJianQCReport();
    }

    @Override
    public Boolean updateSampleList() {
        return taskReportService.updateSampleList();
    }

    @Override
    public Boolean updateStoreState(String recruitmentId, String state) {
        return taskReportService.updateStoreState(recruitmentId, state);
    }

    @Override
    public Boolean delOffLineReport(Date currentTime, String recuitmentId) {
        return taskReportService.delOffLineReport(currentTime, recuitmentId);
    }

    @Override
    public Boolean delOnLineReport(Date currentTime, String recuitmentId) {
        return taskReportService.delOnLineReport(currentTime, recuitmentId);
    }


    @Override
    public void updateDemandFor(String recruitmentType, String idCode, BigDecimal demandFor, String storeContacts, String contactsPhone, String comment) {
        taskReportService.updateDemandFor(recruitmentType, idCode, demandFor, storeContacts, contactsPhone, comment);
    }

    @Override
    public void updateRecruitmentState(String id, String state) {
        taskReportService.updateRecruitmentState(id, state);
    }

    @Override
    public boolean hasRole(String userId, String roleId) {
        return taskReportService.hasRole(userId, roleId);
    }

    @Override
    public void updateOnlineReportInfo(double onlineRecruitmentNum, double projectProvideNum, String comment,String id) {
        taskReportService.updateOnlineReportInfo(onlineRecruitmentNum, projectProvideNum, comment, id);
    }

    @Override
    public void updateOffLineReport(double plannedNum, double finishedNum, double recommendNum,  String councilor, String comment, String resubmisPerson, String id) {
        taskReportService.updateOffLineReport(plannedNum, finishedNum, recommendNum, councilor, comment, resubmisPerson, id);
    }

    @Override
    public void updateOffLineReportInfo(double mgFinishedNum, double clientProvideNum, double projectProvideNum, String id) {
        taskReportService.updateOffLineReportInfo(mgFinishedNum, clientProvideNum, projectProvideNum, id);
    }

    @Override
    public List<String> getRecruitmentIds(List<String> idList,  String recruitWay) {
        return taskReportService.getRecruitmentIds(idList, recruitWay);
    }

    @Override
    public void updateReportMgrInfo(String recuitmentId, String recruitWay, boolean isNeedExecute) {
        taskReportService.updateReportMgrInfo(recuitmentId, recruitWay, isNeedExecute);
    }

    @Override
    public ArrayList<Object[]> getReportCreateTimeList(String recuitmentId, String recruitWay) {
        return taskReportService.getReportCreateTimeList(recuitmentId, recruitWay);
    }

    @Override
    public void delWeeklyReport(List<String> delIds, String recruitWay) {
        taskReportService.delWeeklyReport(delIds, recruitWay);
    }

    @Override
    public void updateWeeklyReportInfo(String recruitmentId, Date needFinishTime, String recruitWay) {
        taskReportService.updateWeeklyReportInfo(recruitmentId, needFinishTime, recruitWay);
    }

    @Override
    public void updateWeeklyReportMgrInfo(String recruitmentId, Date needFinishTime, String recruitWay, String recruitmentType) {
        taskReportService.updateWeeklyReportMgrInfo(recruitmentId, needFinishTime, recruitWay, recruitmentType);
    }

    @Override
    public void autoReviewReportMgrInfo() {
        taskReportService.autoReviewReportMgrInfo();
    }

    @Override
    public void delReportInfoByICode(String recruitWay, List<String> idCodes, Date nextMonday) {
        taskReportService.delReportInfoByICode(recruitWay, idCodes, nextMonday);
    }

    @Override
    public void updateRCSArea(String id, String schemaCode) {
        taskReportService.updateRCSArea(id, schemaCode);
    }

    @Override
    public void updateExecuteDetail(String executeDetailId, BigDecimal newStoreNum, BigDecimal newPlanGearsNum, BigDecimal newPlanRoundNum) {
        taskReportService.updateExecuteDetail(executeDetailId,newStoreNum,newPlanGearsNum,newPlanRoundNum);
    }

    @Override
    public void updateExecuteReportInfo(String executeDetailId, BigDecimal newStoreNum, BigDecimal newPlanGearsNum, BigDecimal newPlanRoundNum) {
        taskReportService.updateExecuteReportInfo(executeDetailId,newStoreNum,newPlanGearsNum,newPlanRoundNum);
    }

    @Override
    public void updateExecuteMgrInfo(String executeId, Date activityStartTime, Date activityEndTime) {
        taskReportService.updateExecuteMgrInfo(executeId, activityStartTime, activityEndTime);
    }

    @Override
    public void delExecuteReport(List<String> executeIds) {
        taskReportService.delExecuteReport(executeIds);
    }

    @Override
    public void updateExecuteReportEndTime(String executeDemandId, Date activityEndTime) {
        taskReportService.updateExecuteReportEndTime(executeDemandId, activityEndTime);
    }

    @Override
    public void createExecuteDetail(Map<String, Object> data) {
        taskReportService.createExecuteDetail(data);
    }

    @Override
    public List<String> getExecuteDemandIds(List<String> idList) {
        return  taskReportService.getExecuteDemandIds(idList);
    }


    @Override
    public void updateDetailState(String demandId, String year, String month, String cycle, String state) {
        taskReportService.updateDetailState(demandId,year,month,cycle,state);
    }

    @Override
    public void updateExecuteCreateReportTime(String demandId, String year, String month, String cycle, Date reportCreateTime) {
        taskReportService.updateExecuteCreateReportTime(demandId,year,month,cycle,reportCreateTime);
    }

    @Override
    public void updateExecuteDemandEndTime(String demandId, Date activityEndTime) {
        taskReportService.updateExecuteDemandEndTime(demandId,activityEndTime);
    }

    @Override
    public void updateExecuteReportByOp(double actualGearsNum, double actualRoundNum, String councilor, String remark, String resubmisPerson, String id,double reasonNum,String arePersons) {
        taskReportService.updateExecuteReportByOp(actualGearsNum,actualRoundNum,councilor,remark, resubmisPerson, id, reasonNum, arePersons);
    }

    @Override
    public void updateExecuteReportByPM(double mgGearsNum, double mgRoundNum, double projectProvideNum, double clientProvideNum, String id) {
        taskReportService.updateExecuteReportByPM(mgGearsNum,mgRoundNum,projectProvideNum,clientProvideNum,id);
    }

    @Override
    public void updateExecuteReportMgr(Set<String> demandIdSet,boolean isNeedExecute) {
        taskReportService.updateExecuteReportMgr(demandIdSet,isNeedExecute);
    }

    @Override
    public void updateReportCreateTime(String executeDemandId, List<String> cycleList, List<String> weeklyReportDayList) {
        taskReportService.updateReportCreateTime(executeDemandId,cycleList,weeklyReportDayList);
    }

    @Override
    public void updateDemandDetailStatus() {
        taskReportService.updateDemandDetailStatus();
    }

    @Override
    public void delStoreByExecuteId(String executeId) {
        taskReportService.delStoreByExecuteId(executeId);
    }

    @Override
    public void updateRCSAreaByExecuteId(String executeId) {
        taskReportService.updateRCSAreaByExecuteId(executeId);
    }

    @Override
    public void updateAttrStatusByExecuteId(String executeId) {
        taskReportService.updateAttrStatusByExecuteId(executeId);
    }

    @Override
    public void updatePM(String originalPMId, String originalPMDeptId, String PMId, String PMDeptId, String projectName, String subjectName) {
        taskReportService.updatePM(originalPMId, originalPMDeptId, PMId, PMDeptId, projectName, subjectName);
    }

    @Override
    public void updateEM(Map<String, Object> data) {
        taskReportService.updateEM(data);
    }

    @Override
    public void updateExecuteReportTime(String executeId, Date oldWeekTime, Date newWeekTime) {
        taskReportService.updateExecuteReportTime(executeId,oldWeekTime,newWeekTime);
    }

    @Override
    public List<Map<String, Object>> getCalculateNum(HashMap<String, Set<String>> demandIdMap, String recruitWay) {
        return taskReportService.getCalculateNum(demandIdMap,recruitWay);
    }

    @Override
    public void autoCloseDemand() {
        taskReportService.autoCloseDemand();
    }

    @Override
    public void autoCommitReport() {
        taskReportService.autoCommitReport();
    }
    @Override
    public void autoReviewReport(String type) {
        taskReportService.autoReviewReport(type);
    }

    @Override
    public void autoArchiveReport(String type) {
        taskReportService.autoArchiveReport(type);
    }

    @Override
    public Map<String, String> getUncommittedReportTips() {
        return taskReportService.getUncommittedReportTips();
    }

    @Override
    public Map<String, String> getUnReviewedReportTips(String type) {
        return taskReportService.getUnReviewedReportTips(type);
    }

    @Override
    public Map<String, String> getUnArchivedReportTips(String type) {
        return taskReportService.getUnArchivedReportTips(type);
    }

    @Override
    public  List<Map<String, Object>> getNoContractProject(int startDays, int endDays) {
        return taskReportService.getNoContractProject(startDays, endDays);
    }

    @Override
    public Map<String, String> getDemandInfo(String demandId, String subSchemaCode) {
        return taskReportService.getDemandInfo(demandId, subSchemaCode);
    }

    @Override
    public String getProjectDirector(String userId, String projectDirectorRoleId) {
        return taskReportService.getProjectDirector(userId, projectDirectorRoleId);
    }

    @Override
    public List<Map<String, Object>> traceRecruitment(int days) {
        return taskReportService.traceRecruitment(days);
    }

    @Override
    public void updateStoreInfo(String demandId, String subjectName, List<Map<String, Object>> containsStores, String code) {
        taskReportService.updateStoreInfo(demandId, subjectName, containsStores, code);
    }

    @Override
    public void createRecruitmentDetail(Map<String, Object> data) {
        taskReportService.createRecruitmentDetail(data);
    }

    @Override
    public void updateRecruitmentDetailStatus(List<String> idCodes, String state) {
        taskReportService.updateRecruitmentDetailStatus(idCodes,state);
    }

    @Override
    public void updateDetailStoreState(List<String> demandIds, String customerStoreNum, String state) {
        taskReportService.updateDetailStoreState(demandIds,customerStoreNum,state);
    }

    @Override
    public void updateDemandForById(String demandId, String recruitWay) {
        taskReportService.updateDemandForById(demandId, recruitWay);
    }

    @Override
    public void updateStoreRCSArea(String subjectName) {
        taskReportService.updateStoreRCSArea(subjectName);
    }

    @Override
    public void updateZPDetail(List<String> demandIds, String storeShortName, String rcsArea, String province, String cityName, String district, String detailArea, String area, String storeOutlet,  String customDockingPerson, String customLinkType, String cityLevel,String customerStoreNum) {
        taskReportService.updateZPDetail(demandIds,storeShortName,rcsArea,province,cityName,district,detailArea,area,storeOutlet,customDockingPerson,customLinkType,cityLevel,customerStoreNum);
    }

    @Override
    public void updateDJDetail(List<String> demandIds, String storeShortName,  String province, String cityName, String district, String detailArea, String area, String storeOutlet, String customDockingPerson, String customLinkType, String cityLevel,String customerStoreNum) {
        taskReportService.updateDJDetail(demandIds,storeShortName,province,cityName,district,detailArea,area,storeOutlet,customDockingPerson,customLinkType,cityLevel,customerStoreNum);
    }

    @Override
    public void clearFASQ(String id) {
        taskReportService.clearFASQ(id);
    }

}
